package com.ruoyi.project.charge.controller;

import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.project.charge.service.DrugService;
import com.ruoyi.project.charge.vo.DispatchParams;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @auther:YU JIANG
 * @date:2021/7/15
 * @time:18:13
 */
@RestController
@RequestMapping("/system/dispatch")
public class DrugController extends BaseController {

    @Autowired
    private DrugService drugService;

    @RequestMapping("/updateStock")
    public AjaxResult updateStock(DispatchParams params){
        System.out.println(params);
        int i = drugService.updateStock(params);
        return toAjax(i);
    }
}
